package com.kvn.dubbo.spi;

import com.alibaba.dubbo.common.extension.ExtensionLoader;

/**
 * Created by wangzhiyuan on 2019/1/31
 */
public class CustomMainTest {
    public static void main(String[] args) {
        Strategy strategy = ExtensionLoader.getExtensionLoader(Strategy.class).getDefaultExtension();
        System.out.println("result:" + strategy.calcutlate(1, 2));

        strategy = ExtensionLoader.getExtensionLoader(Strategy.class).getExtension("plus");
        System.out.println("result:" + strategy.calcutlate(1, 2));

        strategy = ExtensionLoader.getExtensionLoader(Strategy.class).getExtension("minus");
        System.out.println("result:" + strategy.calcutlate(1, 2));
    }
}
